public class ThreadDemo9 {
    public static void main(String[] args) {
        Thread thread = new Thread(() -> {
//           while(true) {
//
//           }
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

        });
        System.out.println(thread.getState());
        thread.start();
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(thread.getState());
    }
}
